﻿//-----------------------------------------------------------------------
// <copyright file="Copyright.cs" author="Michael Herndon">
//     Copyright (c) CompanyName.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Amplify.Twitter
{
	#region Using Statements
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;

	using MbUnit.Framework;

	using Describe = MbUnit.Framework.TestsOnAttribute;
	using InContext = MbUnit.Framework.DescriptionAttribute;
	using It = MbUnit.Framework.TestAttribute;
	using Should = MbUnit.Framework.DescriptionAttribute;
	using By = MbUnit.Framework.AuthorAttribute;
	using Tag = MbUnit.Framework.CategoryAttribute;
	#endregion

	using System.Security;

	[
		Describe(typeof(UserClient)),
		InContext("should perform its specified behavor."),
		Tag("Functional"),
		Ignore,
		By("Michael Herndon", "mherndon@opensourceconnections.com", "www.amptools.net")
	]
	public class UserClientSpec : Spec
	{

		[It, Should(" should get one user. ")]
		public void InvokeShow()
		{
			UserClient client = Twitter.CreateUserClient();
			User user =	client.Show(AssemblyFixture.Username);
			user.ShouldNotBeNull();
			user.Screename.ToLower().ShouldBe(AssemblyFixture.Username.ToLower());
		}

		[It, Should(" retrieve the friends of the user. ")]
		public void InvokeGetFriends()
		{
			UserClient client = Twitter.CreateUserClient();
			User[] users =	client.GetFriends();
			users.ShouldNotBeNull();
			users.Length.ShouldBeGreaterThan(0);
		}

		[It, Should(" retrieved the followers of the user.")]
		public void InvokeGetFollowers()
		{
			UserClient client = Twitter.CreateUserClient();
			User[] users = client.GetFollowers();
			users.ShouldNotBeNull();
			users.Length.ShouldBeGreaterThan(0);
		}
	}
}
